package com.cssw.fyzb.web.controller;

import com.cssw.fyzb.base.web.context.UserContext;
import com.cssw.fyzb.base.web.domain.AjaxData;
import com.cssw.fyzb.web.service.HelloService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Feng Chen
 */
@RestController
@RequestMapping("/test")
public class HelloController {

    @Autowired
    private HelloService helloService;

    @ApiOperation(value = "获取用户新鲜", response = AjaxData.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户标识", paramType = "query", dataType = "string", required = true)
    })
    @RequestMapping(value = "/getUserInfo", method = RequestMethod.POST)
    public AjaxData getUserInfo(Long userId) {
        return helloService.getUserInfo(userId);
    }

}
